﻿using GameServer;
using GameServer.Virtual_Objects.Room;
using GameServer.Virtual_Objects.User;
using System;

namespace GameServer.Networking.Packets
{
    internal class PACKET_ROOM_UDP_SPECTATE : Packet
    {
        public PACKET_ROOM_UDP_SPECTATE(virtualUser User, virtualRoom Room)
        {
            base.newPacket(29953);
            base.addBlock(1);
            base.addBlock(0);
            base.addBlock(User.SpectatorID);
            base.addBlock(User.UserID);
            base.addBlock(User.SessionID);
            base.addBlock(User.Nickname);
            base.addBlock(999);
        }

        public PACKET_ROOM_UDP_SPECTATE(virtualUser User)
        {
            base.newPacket(29953);
            base.addBlock(1);
            base.addBlock(1);
            base.addBlock(User.SpectatorID);
            base.addBlock(User.UserID);
            base.addBlock(User.SessionID);
            base.addBlock("0");
            base.addBlock(999);
            base.addBlock(User.nIP);
            base.addBlock(User.nPort);
            base.addBlock(User.lIP);
            base.addBlock(User.lPort);
            base.addBlock(0);
        }
    }
}